@extends('admin.master')

@section('css')
    <link rel="stylesheet" type="text/css" href="/css/ga-embed.css">
    <style>
        .user-email {
            font-size: .85rem;
            margin-bottom: 1.5em;
        }

        .row-box {
            padding: 20px;
        }
    </style>
@stop

@section('content')
    <div style="position:relative; z-index:9; text-align:center;">
        <img src="/storage/{{ $user->avatar }}" class="avatar"
             style="border-radius:50%; width:150px; height:150px; border:5px solid #fff;"
             alt="{{ $user->name }} avatar">
        <h4>{{ ucwords($user->name) }}</h4>
    </div>
    <div class="row-box">
        <div class="row">
            <div class="col-md-4">手机号：{{ $user->mobile }}</div>
            <div class="col-md-4">角色：{{ $user->role->name }}</div>
            <div class="col-md-4">所属区域：{{ $user->address }}</div>
        </div>
        @if ($user->id == Auth::user()->id || $edit_user)
        <a href="{{ route('admin.users.add', $user->id) }}" class="btn btn-primary btn-block"
           style="text-align:center;margin:0px auto;width:100px;margin-top:20px;">编辑</a>
        @endif
    </div>
@stop
